package p270jp.pxv.android.legacy.constant;

import android.content.Context;
import p216hn.DefaultConstructorMarker;
import p270jp.pxv.android.R;
import p325m0.MutabilityOwnership;

/* compiled from: SearchTarget.kt */
/* renamed from: jp.pxv.android.legacy.constant.SearchTarget */
/* loaded from: classes2.dex */
public enum SearchTarget {
    PARTIAL_MATCH_FOR_TAGS(R.string.search_target_partial_tag, "partial_match_for_tags"),
    EXACT_MATCH_FOR_TAGS(R.string.search_target_total_tag, "exact_match_for_tags"),
    TITLE_AND_CAPTION(R.string.search_target_title_and_caption, "title_and_caption"),
    TEXT(R.string.search_target_text, "text"),
    KEYWORD(R.string.search_target_keyword, "keyword");
    
    public static final Companion Companion = new Companion(null);
    private static final SearchTarget[] VALUES_BY_CONTENT_TYPE_ILLUST_OR_MANGA;
    private static final SearchTarget[] VALUES_BY_CONTENT_TYPE_NOVEL;
    private final int titleResId;
    private final String value;

    /* compiled from: SearchTarget.kt */
    /* renamed from: jp.pxv.android.legacy.constant.SearchTarget$Companion */
    /* loaded from: classes2.dex */
    public static final class Companion {

        /* compiled from: SearchTarget.kt */
        /* renamed from: jp.pxv.android.legacy.constant.SearchTarget$Companion$WhenMappings */
        /* loaded from: classes2.dex */
        public /* synthetic */ class WhenMappings {
            public static final /* synthetic */ int[] $EnumSwitchMapping$0;

            static {
                int[] iArr = new int[ContentType.values().length];
                iArr[ContentType.ILLUST.ordinal()] = 1;
                iArr[ContentType.MANGA.ordinal()] = 2;
                iArr[ContentType.NOVEL.ordinal()] = 3;
                $EnumSwitchMapping$0 = iArr;
            }
        }

        private Companion() {
        }

        public /* synthetic */ Companion(DefaultConstructorMarker eVar) {
            this();
        }

        public final SearchTarget[] getValuesByContentType(ContentType contentType) {
            MutabilityOwnership.m3745m(contentType, "contentType");
            int i = WhenMappings.$EnumSwitchMapping$0[contentType.ordinal()];
            if (i == 1 || i == 2) {
                return SearchTarget.VALUES_BY_CONTENT_TYPE_ILLUST_OR_MANGA;
            }
            if (i == 3) {
                return SearchTarget.VALUES_BY_CONTENT_TYPE_NOVEL;
            }
            throw new IllegalArgumentException();
        }
    }

    static {
        SearchTarget searchTarget;
        SearchTarget searchTarget2;
        SearchTarget searchTarget3;
        SearchTarget searchTarget4 = PARTIAL_MATCH_FOR_TAGS;
        SearchTarget searchTarget5 = EXACT_MATCH_FOR_TAGS;
        VALUES_BY_CONTENT_TYPE_ILLUST_OR_MANGA = new SearchTarget[]{searchTarget4, searchTarget5, searchTarget};
        VALUES_BY_CONTENT_TYPE_NOVEL = new SearchTarget[]{searchTarget4, searchTarget5, searchTarget2, searchTarget3};
    }

    SearchTarget(int i, String str) {
        this.titleResId = i;
        this.value = str;
    }

    public final String getTitle(Context context) {
        MutabilityOwnership.m3745m(context, "context");
        String string = context.getString(this.titleResId);
        MutabilityOwnership.m3746l(string, "context.getString(titleResId)");
        return string;
    }

    public final String getValue() {
        return this.value;
    }
}
